<?php 
$this->headTitle()->append('Đăng nhập');
?>
<?php
$flashMessage = $this->flashMessenger()->getMessages();

if (count($flashMessage)) :
    ?>
<div class="rows">
	<ul>
        <?php
    foreach ($flashMessage as $msg) :
        foreach ($msg as $type => $message) :
            ?>
            <li><span class="<?php echo $type; ?>"><?php echo $message; ?></span></li>
        <?php endforeach; ?>
        <?php endforeach; ?>
        </ul>
    <?php endif; ?>
    <?php if(isset($this->messages)) : ?>
    <ul>
        <?php foreach ($this->messages as $type => $msg) : ?>
        <li><span class="<?php echo $type; ?>"><?php echo $msg; ?></span></li>
        <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>

     <?php
    $form = $this->loginForm;
    $form->prepare();
    echo $this->form()->openTag($form);
    ?>
              <div class="input-group input-group-lg">
				  <span class="input-group-addon"><i class="fa fa-user"></i></span>
				  <?php echo $this->formElement($form->get('email')); ?>                            
				</div>
				<span class="common-error-msg"><?php echo $this->formElementErrors($form->get('email'));?></span>
				<div class="input-group input-group-lg">
					  <span class="input-group-addon"><i class="fa fa-lock"></i></span>
					 <?php echo $this->formElement($form->get('password')); ?>                           
				</div>
				<span class="common-error-msg"><?php echo $this->formElementErrors($form->get('password'));?></span>
				 <?php
                      echo $this->formRow($form->get('loginCsrf'));
                      echo $this->formElement($form->get('submit'));
                  ?>

                <?php
                echo $this->form()->closeTag($form);
                ?>
